<?php header('Content-Type:text/html;charset=utf-8');?>
<?php
    if(isset($_GET['id']))
    {
        require_once("mysql_config.php");
        $db = new PDO("mysql:host={$dbhost};dbname={$dbname}","{$dbuid}","{$dbpwd}");
        $sql = "SELECT IFNULL(_date,''),IFNULL(_title,''),IFNULL(_body,'') FROM _Article where _sid ={$_GET['id']}";
        
        $db->query("set names utf8;");
        $rs = $db->query($sql);
        $row = $rs->fetch();
    }
    else
    {   
        exit("未知文章");
    }
?>

<!DOCTYPE html>
<head>
    <title><?=$row[1]?></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>

<body>

<p>
<?=$row[2]?>
</p>


</body>
</html>
